<template>
  <div id="app">
    <Hello title="《开始循环》" name="开始循环!"></Hello>
    <Hello v-for="movie in movies" :key="movie.id" :title="movie.title" :name="movie.name"></Hello>
    <Draw></Draw>
  </div>
</template>

<script>
import Draw from "./components/Draw.vue";
import Hello from "./components/Hello.vue"

export default {
  name: 'App',
  data: function () {
    return {
      movies: [
        { id: 1, title: "金刚狼1", name: "于瀚舒1" },
        { id: 2, title: "金刚狼2", name: "于瀚舒2" },
        { id: 3, title: "金刚狼3", name: "于瀚舒3" },
      ]
    }
  },
  created: function () {
    console.log("App 组件被创建了!")
  },
  mounted: function () {
    console.log("App 组件被挂载，渲染了!")
  },
  components: {
    Hello,
    Draw
  }
}

</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

nav {
  padding: 30px;
}

nav a {
  font-weight: bold;
  color: #2c3e50;
}

nav a.router-link-exact-active {
  color: #42b983;
}
</style>
